#ifndef GAMEMESSAGE_H
#define GAMEMESSAGE_H

#include <string>
#include "SockMessage.h"

class GameMessage
{
public:
	GameMessage();
	virtual  ~GameMessage()=0;

	virtual void Execute(){}
	static  GameMessage* Read(SockMessage* sm);
	bool Write(SockMessage* sm);
	void SetTimestamp(float f);
	virtual bool ReadFromSocketM(SockMessage* sm)=0;
	virtual bool WriteToSocketM (SockMessage* sm)=0;
	float GetTimestamp();

	virtual const char*  GetName() = 0;

protected:

	std::string m_Msg;
	float m_Timestamp;
};

#endif